<?php defined('IN_IA') or exit('Access Denied');?><?php  $frames = buildframes(FRAME);_calc_current_frames($frames);?>
<div id="user-nav" class="navbar navbar-inverse">
    <ul class="nav">
        <!-- <li class="dropdown" id="profile-messages"><a title="" href="http://www.jq22.com/demo/matrix-admin-141119230429/grid.html#"
                data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle"><i class="fa fa-user"></i>
                <span class="text">Welcome User</span><b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="http://www.jq22.com/demo/matrix-admin-141119230429/grid.html#"><i class="fa fa-user"></i>
                        My Profile</a></li>
                <li class="divider"></li>
                <li><a href="http://www.jq22.com/demo/matrix-admin-141119230429/grid.html#"><i class="fa fa-check"></i>
                        My Tasks</a></li>
                <li class="divider"></li>
                <li><a href="http://www.jq22.com/demo/matrix-admin-141119230429/login.html"><i class="fa fa-key"></i>
                        Log Out</a></li>
            </ul>
        </li> -->

        <?php  if(!empty($_W['uid'])) { ?>
            <?php  global $top_nav?>
            <?php  $nav_top_fold=array()?>
            <?php  $nav_top_tiled=array()?>
            <?php  $nav_custom=array()?>
            <?php  $platform_url=url('account/display')?>
            <?php  $nav_top_fold[] = array('name' => 'all', 'title'=>'全部', 'type' => 'all', 'url' => $platform_url)?>
            <?php  if(is_array($top_nav)) { foreach($top_nav as $nav) { ?>
                <?php  if(in_array($nav['name'], array(ACCOUNT_TYPE_SIGN, WXAPP_TYPE_SIGN, WEBAPP_TYPE_SIGN, PHONEAPP_TYPE_SIGN, XZAPP_TYPE_SIGN))) { ?>
                    <?php  $nav_top_fold[]=$nav?>
                <?php  } else if(in_array($nav['name'], array('platform', 'module', 'system', 'site'))) { ?>
                    <?php  if($nav['name'] == 'platform') { ?><?php  $nav['fa'] = 'cloud'?><?php  } ?>
                    <?php  if($nav['name'] == 'module') { ?><?php  $nav['fa'] = 'cube'?><?php  } ?>
                    <?php  if($nav['name'] == 'system') { ?><?php  $nav['fa'] = 'wrench'?><?php  } ?>
                    <?php  if($nav['name'] == 'site') { ?><?php  $nav['fa'] = 'desktop'?><?php  } ?>
                    <?php  $nav_top_tiled_system[]=$nav?>
                <?php  } else if(in_array($nav['name'], array('appmarket', 'store', 'help', 'advertisement'))) { ?>
                    <?php  $nav_top_tiled_other[]=$nav?>
                <?php  } else if($nav['name']=='custom_help') { ?>
                    <?php  $nav_top_help=$nav?>
                <?php  } else { ?>
                    <?php  $nav_top_tiled_other[]=$nav?>
                <?php  } ?>
            <?php  } } ?>

            <li class="dropdown">
                <a href="javascript:;" id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <i class="fa fa-tag"></i>
                    <span class="text">系统菜单</span>
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu pull-left" aria-labelledby="dLabel">
                    <?php  if(is_array($nav_top_tiled_system)) { foreach($nav_top_tiled_system as $nav) { ?>
                    <li><a title="<?php  echo $nav['title'];?>" href="<?php  if(empty($nav['url'])) { ?><?php  echo url('home/welcome/' . $nav['name']);?><?php  } else { ?><?php  echo $nav['url'];?><?php  } ?>"
                            target="_blank">
                            <i class="fa fa-<?php  echo $nav['fa'];?>"></i> <span class="text"><?php  echo $nav['title'];?></span></a></li>
                    <?php  } } ?>
            
                    <li><a href="<?php  echo url('module/default-entry', ['m'=>MNAME,'version_id'=>0])?>" class="text-over">
                        <i class="fa fa-caret-square-o-right"></i> 默认入口</a></li>
                    <li><a href="<?php  echo url('module/permission', ['m'=>MNAME,'version_id'=>0])?>" class="text-over">
                        <i class="fa fa-cog"></i> 权限设置</a></li>
                </ul>
            </li>
        <?php  } ?>
        <?php  if(is_array($ads)) { foreach($ads as $ad) { ?>
            <li><?php  echo $ad;?></li>
        <?php  } } ?>
    </ul>
</div>
<?php  if(!empty($ad_rb)) { ?>
    <script>
        var html = '<div style="position:fixed;z-index:999999;right:30px;bottom:30px;height:120px;overflow:hidden"><?php  echo $ad_rb;?><span style="position:absolute;top:0;right:0;background:#ccc;color:#f0f0f0;padding:0 6px;cursor:pointer" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">关闭</span></div>';
        document.body.innerHTML += html;
    </script>
<?php  } ?><script>var we7CommonForModule = document.createElement("script");we7CommonForModule.src = '//cdn.w7.cc/we7/w7windowside.js?v=201904260003';document.body.appendChild(we7CommonForModule)
</script>